{{csrf_field()}}

<div class="layui-form-item">
    <label class="layui-form-label">所属栏目：</label>
    <div class="layui-input-inline">
        <select name="parent_id"  id="parent_id" >
            <option value="0">顶级栏目</option>
            @if(isset($tree) && $tree)
                @foreach($tree as $key=>$val)
                    @if((isset($dao) && $dao['parent_id'] == $val['id']) || (isset($pid) && $pid == $val['id']))
                        <option value="{{$val['id']}}" selected >{!! str_repeat('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;', intval($val['lv'])) !!} {{$val['name']}}</option>
                    @else
                        <option value="{{$val['id']}}" >{!! str_repeat('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;', intval($val['lv'])) !!}{{$val['name']}}</option>
                    @endif
                @endforeach
            @endif
        </select>
    </div>
</div>

<div class="layui-form-item">
    <label for="" class="layui-form-label">品牌名称：</label>
    <div class="layui-input-inline">
        <input type="text" name="name" value="{{ $dao['name'] ?? "" }}" lay-verify="required" placeholder="请输入菜单名称" class="layui-input" >
    </div>
</div>

<div class="layui-form-item">
    <label for="" class="layui-form-label">排序：</label>
    <div class="layui-input-inline">
        <input type="text" name="sort" value="{{ $dao['sort'] ?? 0 }}"  placeholder="请输入排序" class="layui-input" >
    </div>
</div>

<div class="layui-form-item">
    <div class="layui-input-block">
        <button type="submit" class="layui-btn" lay-submit="" lay-filter="postForm">确 认</button>
        <a  class="layui-btn" href="javascript:void(0)" id="close" >关 闭</a>
    </div>
</div>